<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" template="/WEB-INF/layout/t.xhtml">
	<ui:define name="title">
		<h:outputText value="Gestione Configurazione Account Instagram" />
	</ui:define>
	<ui:define name="roles">
		<f:attribute name="roles" value="instagram" />
	</ui:define>

	<ui:define name="content">

		<center>
			<h:form>
				<p:panel header="Gestione Configurazione Account Instagram">


					<h:panelGrid columns="2" style="width: 95%">

						<h:outputLabel value="token:" for="token" />
						<h:inputText id="token"
							value="#{instagramConfigurationController.element.token}"
							style="width: 100%;" />

						<h:outputLabel value="clientId:" for="clientId" />
						<h:inputText id="clientId"
							value="#{instagramConfigurationController.element.clientId}"
							style="width: 100%;" />

						<h:outputLabel value="clientSecret:" for="clientSecret" />
						<h:inputText id="clientSecret"
							value="#{instagramConfigurationController.element.clientSecret}"
							style="width: 100%;" />

						<h:outputLabel value="grantType:" for="grantType" />
						<h:inputText id="grantType"
							value="#{instagramConfigurationController.element.grantType}"
							style="width: 100%;" />

						<h:outputLabel value="redirectUri:" for="redirectUri" />
						<h:inputText id="redirectUri"
							value="#{instagramConfigurationController.element.redirectUri}"
							style="width: 100%;" />

						<h:outputLabel value="code:" for="code" />
						<h:inputText id="code"
							value="#{instagramConfigurationController.element.code}"
							style="width: 100%;" />

						<h:outputLabel value="accessTokenUri:" for="accessTokenUri" />
						<h:inputText id="accessTokenUri"
							value="#{instagramConfigurationController.element.accessTokenUri}"
							style="width: 100%;" />

						<h:outputLabel value="initialUri:" for="initialUri" />
						<h:inputText id="initialUri"
							value="#{instagramConfigurationController.element.initialUri}"
							style="width: 100%;" />


					</h:panelGrid>
					<br />

				</p:panel>
				<br />
				<br />

				<h:panelGrid columns="3">

					<h:commandButton
						action="#{instagramConfigurationController.update}"
						value="Salva le modifiche" />

					<h:commandButton id="reset"
						action="#{instagramConfigurationController.reset}" value="Annulla"
						immediate="true" />

					<h:commandButton id="richiedi"
						action="#{instagramConfigurationController.requestCode}"
						value="Richiedi CODE" immediate="true" />

					<h:commandButton id="richiediToken"
						action="#{instagramConfigurationController.requestToken}"
						value="Richiedi TOKEN" immediate="true" />

				</h:panelGrid>
			</h:form>
		</center>
	</ui:define>
</ui:composition>